package com.ruoyi.common.core.domain.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @version :
 * @program: easyBuy
 * @description: 极光图片消息model
 * @author: 周爱鸿
 * @create: 2020-09-18 14:47
 **/
@ApiModel("极光图片消息model")
@Data
public class IMImageMessageModel extends IMMessageModel {
	@ApiModelProperty("消息体")
	private ImageBody messageBody;

	@Data
	public class ImageBody{
		@ApiModelProperty("文件上传之后服务器端所返回的key，用于之后生成下载的url")
		@NotEmpty
		private String 	mediaId;


		@ApiModelProperty("文件的crc32校验码，用于下载大图的校验")
		@NotNull
		private Long mediaCrc32;


		@ApiModelProperty("图片原始宽度")
		@NotNull
		private Integer width;


		@ApiModelProperty("图片原始高度")
		@NotNull
		private Integer height;

		@ApiModelProperty("图片格式")
		@NotEmpty
		private String format;

		@ApiModelProperty("文件大小（字节数）")
		@NotNull
		private Integer fsize;

		@ApiModelProperty(" 图片hash值")
		private String hash;


	}
}
